export interface IFileAttachment {
  ID?: string | null;
  FileName?: string | null;
  Length?: number | null;
  UploadTime?: Date | null;
  SaveMode?: string | null;
  ExtraInfo?: string | null;
  FileExt?: string | null;
  ThumbnailUrl?: string | null;
  Url?: string | null;
  IsTemporary?: boolean | null;
}
export interface GetRequest {
  Limit: number;
  Page: number;
  PersonId: string;
  SortInfo: string | null;
}

export interface GetResponse {
  Entity: {
    ID?: string | null;
    BillCode: string | null;
    BillStatus: number | null | string;
    WorkflowStatus: number | null | string;
    Remark: string | null;
    Approver: string | null;
    ApprovalTime: Date | null;
    Name: string | null;
    StaffNo: string | null;
    BirthDate: Date | null;
    Age: number | null;
    Gender: string | null;
    Ethnicity: string | null;
    HighestEducation: string | null;
    MajorCategory: string | null;
    MajorName: string | null;
    MaritalStatus: string | null;
    FertilityStatus: string | null;
    PhotoId: string | null;
    Photo?: IFileAttachment;
    IdCardNo: string | null;
    IdCardFrontPhotoId: string | null;
    IdCardFrontPhoto?: IFileAttachment;
    IdCardBackPhotoId: string | null;
    IdCardBackPhoto?: IFileAttachment;
    IdCardExpiryDate: Date | null;
    HouseholdRegistration: string | null;
    NativePlace: string | null;
    PoliticalStatus: string | null;
    PartyJoinDate: Date | null;
    PartyBranch: string | null;
    ArchiveLocation: string | null;
    ArchiveNo: string | null;
    ArchiveTransferOutDate: Date | null;
    ArchiveTransferInDate: Date | null;
    HomeAddress: string | null;
    Phone: string | null;
    Email: string | null;
    SalaryBank: string | null;
    SalaryAccount: string | null;
    BonusBank: string | null;
    BonusAccount: string | null;
    OrgId: string | null;
    Org?: ISysOrg;
    GroupId: string | null;
    Group?: ISysGroup;
    JobPositionId: string | null;
    JobPosition?: ISysJobPosition;
    ResumeId: string | null;
    Resume?: IFileAttachment;
    HireDate: Date | null;
    ConfirmationDate: Date | null;
    EmploymentType: number | null;
    ContractType: number | null;
    ContractNo: string | null;
    ContractStartDate: Date | null;
    ContractEndDate: Date | null;
    ResignationDate: Date | null;
    ResignationReason: string | null;
    ResignationType: number | null;
    State: string | null;
    BloodType: string | null;
    Hobbies: string | null;
    JoinWorkDate: Date | null; // 参加工作时间
    ArchiveAgeDate: Date | null; // 档案年龄
    WorkYears: number | null; // 工龄
    CompanyYears?: number | null; // 司龄
    IsVeteran: boolean | null; // 是否退伍军人
    VeteranCertificateId: string | null; // 退伍证图片ID
  };
  IsMyApprove: boolean;
}

// 搜索请求参数
export interface SearchRequest {
  Limit: number;
  Page: number;
  SortInfo: null;
}


export interface SearchResponse {
  Age: number;
  ArchiveLocation: string;
  ArchiveNo: string;
  ArchiveTransferInDate: string;
  ArchiveTransferOutDate: string;
  BirthDate: string;
  BloodType: string;
  BonusAccount: string;
  BonusBank: string;
  ConfirmationDate: string;
  ContractEndDate: string;
  ContractNo: string;
  ContractStartDate: string;
  ContractType: string;
  Email: string;
  EmploymentType: string;
  Ethnicity: string;
  Gender: string;
  GroupName: string;
  HighestEducation: string;
  MajorCategory: string;
  MajorName: string;
  FertilityStatus: string;
  HireDate: string;
  Hobbies: string;
  HomeAddress: string;
  HouseholdRegistration: string;
  ID: string;
  IdCardBackPhotoId: string;
  IdCardFrontPhotoId: string;
  IdCardNo: string;
  IdCardExpiryDate: string;
  JobPositionName: string;
  MaritalStatus: string;
  Name: string;
  NativePlace: string;
  PartyBranch: string;
  PartyJoinDate: string;
  Phone: string;
  PhotoId: string;
  PoliticalStatus: string;
  ResignationDate: string;
  ResignationReason: string;
  ResignationType: string;
  SalaryAccount: string;
  SalaryBank: string;
  StaffNo: string;
  State: string;
  WorkflowStatus: string;
  BillStatus: string;
  JoinWorkDate: string; // 参加工作时间
  ArchiveAgeDate: string; // 档案年龄日期
}

// 学习经历返回
export interface GetEducationResponse {
  EducationLevel: string;
  EducationSystem: string;
  EnrollmentDate: string;
  GraduationDate: string;
  ID: string;
  Major: string;
  PersonName: string;
  School: string;
  SelectedEducationFilesIds?: { FileId: string }[];
}

// 家庭成员返回
export interface GetFamilyResponse {
  BirthDate: string;
  ContactPhone: string;
  Ethnicity: string;
  ID: string;
  JobOrGrade: string;
  MemberName: string;
  PersonName: string;
  RelationshipType: string;
  WorkOrSchool: string;
}


// 工作经历返回
export interface GetWorkResponse {
  Company: string;
  EndDate: string;
  ID: string;
  PersonName: string;
  Position: string;
  Reference: string;
  StartDate: string;
}


// 学习经历详情返回
export interface GetEducationDetailResponse {
  Entity: GetEducationResponse;
  SelectedEducationFilesIds?: {
    FileId: string;
    ID: string;
    Order: number;
    PersonEducationId: string;
  }[];
}

// 家庭成员详情返回
export interface GetFamilyDetailResponse {
  Entity: GetFamilyResponse;
}

// 工作经历详情返回
export interface GetWorkDetailResponse {
  Entity: GetWorkResponse;
}

// 保存档案补录返回
export interface ISysPersonRepairBill {
  ID?: string | null;
  BillCode: string | null;
  BillStatus: number | null | string;
  WorkflowStatus: number | null | string;
  Remark: string | null;
  Approver: string | null;
  ApprovalTime: Date | null;
  Name: string | null;
  StaffNo: string | null;
  BirthDate: Date | null;
  Age: number | null;
  Gender: string | null;
  Ethnicity: string | null;
  HighestEducation: string | null;
  MajorCategory: string | null;
  MajorName: string | null;
  MaritalStatus: string | null;
  FertilityStatus: string | null;
  PhotoId: string | null;
  Photo?: IFileAttachment;
  IdCardNo: string | null;
  IdCardFrontPhotoId: string | null;
  IdCardFrontPhoto?: IFileAttachment;
  IdCardBackPhotoId: string | null;
  IdCardBackPhoto?: IFileAttachment;
  IdCardExpiryDate: Date | null;
  HouseholdRegistration: string | null;
  NativePlace: string | null;
  PoliticalStatus: string | null;
  PartyJoinDate: Date | null;
  PartyBranch: string | null;
  ArchiveLocation: string | null;
  ArchiveNo: string | null;
  ArchiveTransferOutDate: Date | null;
  ArchiveTransferInDate: Date | null;
  HomeAddress: string | null;
  Phone: string | null;
  Email: string | null;
  SalaryBank: string | null;
  SalaryAccount: string | null;
  BonusBank: string | null;
  BonusAccount: string | null;
  OrgId: string | null;
  Org?: ISysOrg;
  GroupId: string | null;
  Group?: ISysGroup;
  JobPositionId: string | null;
  JobPosition?: ISysJobPosition;
  ResumeId: string | null;
  Resume?: IFileAttachment;
  HireDate: Date | null;
  ConfirmationDate: Date | null;
  EmploymentType: number | null;
  ContractType: number | null;
  ContractNo: string | null;
  ContractStartDate: Date | null;
  ContractEndDate: Date | null;
  ResignationDate: Date | null;
  ResignationReason: string | null;
  ResignationType: number | null;
  State: string | null;
  BloodType: string | null;
  Hobbies: string | null;
  JoinWorkDate: Date | null, // 参加工作时间
  ArchiveAgeDate: Date | null, // 档案年龄日期
  WorkYears: number | null, // 工龄
  CompanyYears?: number | null, // 司龄
  IsVeteran: boolean | null, // 是否退伍军人
  VeteranCertificateId: string | null, // 退伍证图片ID
}

// 档案补录请求参数
export interface ISysPersonRepairBillVm {
  Entity: ISysPersonRepairBill;
  ActionName: string | null;
  IsMyApprove: boolean | null;
}

// 系统人员维修单审批请求参数
export interface ISysPersonRepairBillApproveRequest {
  ActionName: string; // 审批动作名称，如"拒绝"、"同意"等
  Entity: ISysPersonRepairBill; // 实体对象，可以为空对象{}
  IsMyApprove: boolean; // 是否为我的审批
  Remark?: string; // 审批备注
}





export interface ISysPersonEducationVm {
  Entity: ISysPersonEducation;
  SelectedEducationFilesIds: { FileId: string }[]
}
export interface ISysPersonEducation {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  School: string | null;
  Major: string | null;
  EducationLevel: string | null;
  EducationSystem: string | null;
  EnrollmentDate: Date | null;
  GraduationDate: Date | null;
}
export interface ISysPerson {
  ID?: string | null;
  Name: string | null;
  StaffNo: string | null;
  BirthDate: Date | null;
  Age: number | null;
  Gender: string | null;
  Ethnicity: string | null;
  HighestEducation: string | null;
  MajorCategory: string | null;
  MajorName: string | null;
  MaritalStatus: string | null;
  FertilityStatus: string | null;
  PhotoId: null;
  Photo?: IFileAttachment;
  IdCardNo: string | null;
  IdCardFrontPhotoId: null;
  IdCardFrontPhoto?: IFileAttachment;
  IdCardBackPhotoId: null;
  IdCardBackPhoto?: IFileAttachment;
  IdCardExpiryDate: Date | null;
  HouseholdRegistration: string | null;
  NativePlace: string | null;
  PoliticalStatus: string | null;
  PartyJoinDate: Date | null;
  PartyBranch: string | null;
  ArchiveLocation: string | null;
  ArchiveNo: string | null;
  ArchiveTransferOutDate: Date | null;
  ArchiveTransferInDate: Date | null;
  HomeAddress: string | null;
  Phone: string | null;
  Email: string | null;
  SalaryBank: string | null;
  SalaryAccount: string | null;
  BonusBank: string | null;
  BonusAccount: string | null;
  OrgId: null;
  Org?: ISysOrg;
  GroupId: null;
  Group?: ISysGroup;
  JobPositionId: null;
  JobPosition?: ISysJobPosition;
  ResumeId: null;
  Resume?: IFileAttachment;
  HireDate: Date | null;
  ConfirmationDate: Date | null;
  EmploymentType: number | null;
  ContractType: number | null;
  ContractNo: string | null;
  ContractStartDate: Date | null;
  ContractEndDate: Date | null;
  ResignationDate: Date | null;
  ResignationReason: string | null;
  ResignationType: number | null;
  State: string | null;
  BloodType: string | null;
  Hobbies: string | null;
  JoinWorkDate: Date | null; // 参加工作时间
  ArchiveAgeDate: Date | null; // 档案年龄日期
}

export interface ISysPersonFamilyVm {
  Entity: ISysPersonFamily;

}
export interface ISysPersonFamily {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  MemberName: string | null;
  Ethnicity: string | null;
  BirthDate: Date | null;
  WorkOrSchool: string | null;
  JobOrGrade: string | null;
  ContactPhone: string | null;
  RelationshipType: string;
}

export interface ISysPersonWork {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  Company: string | null;
  Position: string | null;
  StartDate: Date | null;
  EndDate: Date | null;
  Reference: string | null;
}

export interface ISysPersonWorkVm {
  Entity: ISysPersonWork;

}

export interface IRecognizeIdentityCardRequest {
  ImageId: string; // 图片ID
  CardType: string; // 证件类型 front（正面）、back（反面），默认为front
}

// 身份证识别返回结果
export interface IRecognizeIdentityCardResponse {
  Data: {
    Name?: string; // 姓名
    Gender?: string; // 性别
    Nationality?: string; // 民族
    BirthDate?: string; // 出生日期
    Address?: string; // 地址
    IdNumber?: string; // 身份证号码
    IssuingAuthority?: string; // 签发机关
    ValidPeriod?: string; // 有效期
    Message?: string; // 响应消息
  };
  Code: number; // 状态码
  Message: string; // 响应消息
}

// 获取公司列表返回
export interface ISysOrg {
  Disabled: boolean;
  ParentId: string;
  Selected: boolean;
  Text: string;
  Value: string;
}

// 获取部门列表返回
export interface ISysGroup {
  Disabled: boolean;
  ParentId: string;
  Selected: boolean;
  Text: string;
  Value: string;
}

// 获取岗位列表返回
export interface ISysJobPosition {
  Disabled: boolean;
  ParentId: string;
  Selected: boolean;
  Text: string;
  Value: string;
}


export interface ISysPersonResumeView extends ISysPersonResume {

}

export interface ISysPersonResume {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  TransferRequestId: null;
  TransferRequest?: ISysHrTransferRequestBill;
  ResumeType?: string | null;
  StartDate: Date | null;
  EndDate: Date | null;
  OriginalGroupId: string | null;
  OriginalGroup?: ISysGroup;
  OriginalPositionId: string | null;
  OriginalPosition?: ISysJobPosition;
  OriginalRank: string | null;
  OriginalBaseSalary: string | null;
  OriginalPositionSalary: string | null;
  OriginalPerformanceSalary: string | null;
  NewGroupId: string | null;
  NewGroup?: ISysGroup;
  NewPositionId: string | null;
  NewPosition?: ISysJobPosition;
  NewRank: string | null;
  NewBaseSalary: string | null;
  NewPositionSalary: string | null;
  NewPerformanceSalary: string | null;
  // 新增手动输入的部门岗位字段
  OriginalDepartmentPosition?: string | null;
  NewDepartmentPosition?: string | null;
  TransferReason: string | null;
  Remark: string | null;
  OriginalGroupName?: string | null;
  OriginalPositionName?: string | null;
  NewGroupName?: string | null;
  NewPositionName?: string | null;
}

export interface ISysPersonProfessionalTitleView extends ISysPersonProfessionalTitle {

}

export interface ISysPersonProfessionalTitle {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  TitleName: string | null;
  TitleLevel: string | null;
  CertificateCode: string | null;
  SalaryReward: string | null;
  TitleDocumentId: string | null;
  TitleDocument?: IFileAttachment;
  // 新增字段
  ProfessionalTitleTypeId: string | null; // 资质类别ID
  QualificationLevel: string | null; // 资质等级
  IssuingAuthority: string | null; // 发证单位
  ObtainedDate: Date | null; // 获得日期
  ExpiryDate: Date | null; // 有效期日期
  Remark: string | null; // 备注
  QualificationName: string | null; // 资质名称
  ProfessionalTitleTypeName: string | null; // 资质类别名称
  CertificateDocumentId: string | null; // 证书文件ID（新增接口使用）
}

export interface ISysPersonResumeVm {
  Entity: ISysPersonResume;
}

export interface ISysPersonProfessionalTitleVm {
  Entity: ISysPersonProfessionalTitle;
  ActionName?: string | null;
  IsMyApprove?: boolean | null;

}


export interface ISysHrTransferRequestBill {
  Children: ISysHrTransferRequestBill[];
  Disabled: boolean;
  Expended: boolean;
  Icon: string;
  Id: string;
  Leaf: boolean;
  ParentId: string;
  Selected: boolean;
  Tag: string;
  Text: string;
  Url: string;
  Value: string;
}

// 人像验证接口类型
export interface IValidatePortraitRequest {
  ImageId: string; // 图片ID（GUID格式），必填
}

export interface IValidatePortraitResponse {
  Code: number;    // 状态码，200表示成功
  Message: string; // 返回消息
  Data: string | null; // 返回数据
}
